home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / host contacted / jikes.lha / jikes-1.11 / src / ast.cpp < prev    next >
C/C++ Source or Header  |  1999-11-18  |  75KB  |  2,347 lines

  1. // $Id: ast.cpp,v 1.20 1999/11/18 03:37:22 shields Exp $
  2. //
  3. // This software is subject to the terms of the IBM Jikes Compiler
  4. // License Agreement available at the following URL:
  5. // http://www.ibm.com/research/jikes.
  6. // Copyright (C) 1996, 1998, International Business Machines Corporation
  7. // and others.  All Rights Reserved.
  8. // You must accept the terms of that agreement to use this software.
  9. //
  10.  
  11. #include "config.h"
  12. #include "ast.h"
  13. #ifdef TEST
  14.     unsigned Ast::count = 0;
  15. #endif
  16.  
  17.  
  18. //
  19. // Allocate another block of storage for the VariableSymbol array.
  20. //
  21. void VariableSymbolArray::AllocateMoreSpace()
  22. {
  23.     //
  24.     //
  25.     // The variable size always indicates the maximum number of
  26.     // elements that has been allocated for the array.
  27.     // Initially, it is set to 0 to indicate that the array is empty.
  28.     // The pool of available elements is divided into segments of size
  29.     // 2**log_blksize each. Each segment is pointed to by a slot in
  30.     // the array base.
  31.     //
  32.     // By dividing size by the size of the segment we obtain the
  33.     // index for the next segment in base. If base is full, it is
  34.     // reallocated.
  35.     //
  36.     //
  37.     size_t k = size >> log_blksize; /* which segment? */
  38.  
  39.     //
  40.     // If the base is overflowed, reallocate it and initialize the new elements to NULL.
  41.     //
  42.     if (k == base_size)
  43.     {
  44.         int old_base_size = base_size;
  45.         T **old_base = base;
  46.  
  47.         base_size += base_increment;
  48.  
  49.         assert(base_size <= pool -> Blksize()); // There must be enough room to allocate base
  50.  
  51.         base = (T **) pool -> Alloc(sizeof(T *) * base_size);
  52.  
  53.         if (old_base != NULL)
  54.         {
  55.             memmove(base, old_base, old_base_size * sizeof(T *));
  56. // STG:
  57. //                delete [] old_base;
  58.         }
  59.         memset(&base[old_base_size], 0, (base_size - old_base_size) * sizeof(T *));
  60.     }
  61.  
  62.     //
  63.     // We allocate a new segment and place its adjusted address in
  64.     // base[k]. The adjustment allows us to index the segment directly,
  65.     // instead of having to perform a subtraction for each reference.
  66.     // See operator[] below.
  67.     //
  68.     assert(Blksize() <= pool -> Blksize()); // There must be enough room to allocate block
  69.  
  70.     base[k] = (T *) pool -> Alloc(sizeof(T) * Blksize());
  71.     base[k] -= size;
  72.  
  73.     //
  74.     // Finally, we update size.
  75.     //
  76.     size += Blksize();
  77.  
  78.     return;
  79. }
  80.  
  81.  
  82. VariableSymbolArray::VariableSymbolArray(StoragePool *pool_, unsigned estimate = 0) : pool(pool_)
  83. {
  84.     assert(pool -> Blksize() >= 256); // There must be enough space in the storage pool to move !!!
  85.  
  86.     if (estimate == 0)
  87.         log_blksize = 6; // take a guess
  88.     else
  89.     {
  90.         for (log_blksize = 1; (((unsigned) 1 << log_blksize) < estimate) && (log_blksize < 31); log_blksize++)
  91.             ;
  92.     }
  93.  
  94.     //
  95.     // Increment a base_increment size that is big enough not to have to
  96.     // be reallocated. Find a block size that is smaller that the block
  97.     // size of the pool.
  98.     //
  99.     base_increment = (Blksize() > pool -> Blksize() ? Blksize() / pool -> Blksize() : 1) * 2;
  100.     while (Blksize() >= pool -> Blksize())
  101.         log_blksize--;
  102.  
  103.     base_size = 0;
  104.     size = 0;
  105.     top = 0;
  106.     base = NULL;
  107. }
  108.  
  109.  
  110. void AstCompilationUnit::FreeAst()
  111. {
  112.      delete ast_pool;
  113. }
  114.  
  115. //
  116. // This procedure uses a  quick sort algorithm to sort the cases
  117. // in a switch statement.
  118. //
  119. void AstSwitchStatement::SortCases()
  120. {
  121.     int lower,
  122.         upper,
  123.         lostack[32],
  124.         histack[32];
  125.  
  126.     int top,
  127.         i,
  128.         j;
  129.  
  130.     CaseElement pivot, temp;
  131.  
  132.     AstArray<CaseElement *> &map = *cases;
  133.  
  134.     top = 0;
  135.     lostack[top] = 0;
  136.     histack[top] = map.Length() - 1;
  137.  
  138.     while(top >= 0)
  139.     {
  140.         lower = lostack[top];
  141.         upper = histack[top];
  142.         top--;
  143.  
  144.         while(upper > lower)
  145.         {
  146.             //
  147.             // The array is most-likely almost sorted. Therefore,
  148.             // we use the middle element as the pivot element.
  149.             //
  150.             i = (lower + upper) / 2;
  151.             pivot = *map[i];
  152.             *map[i] = *map[lower];
  153.  
  154.             //
  155.             // Split the array section indicated by LOWER and UPPER
  156.             // using ARRAY(LOWER) as the pivot.
  157.             //
  158.             i = lower;
  159.             for (j = lower + 1; j <= upper; j++)
  160.                 if (map[j] -> Value() < pivot.Value() ||
  161.                     (map[j] -> Value() == pivot.Value() && map[j] -> index < pivot.index)) // keep the sort stable
  162.                 {
  163.                     temp = *map[++i];
  164.                     *map[i] = *map[j];
  165.                     *map[j] = temp;
  166.                 }
  167.             *map[lower] = *map[i];
  168.             *map[i] = pivot;
  169.  
  170.             top++;
  171.             if ((i - lower) < (upper - i))
  172.             {
  173.                 lostack[top] = i + 1;
  174.                 histack[top] = upper;
  175.                 upper = i - 1;
  176.             }
  177.             else
  178.             {
  179.                 histack[top] = i - 1;
  180.                 lostack[top] = lower;
  181.                 lower = i + 1;
  182.             }
  183.         }
  184.     }
  185.  
  186.     return;
  187. }
  188.  
  189.  
  190. Ast *Ast::Clone(StoragePool *ast_pool)
  191. {
  192.     return (Ast *) NULL;
  193. }
  194.  
  195. Ast *AstBlock::Clone(StoragePool *ast_pool)
  196. {
  197.     AstBlock *clone = ast_pool -> GenBlock();
  198.  
  199.     for (int i = 0; i < this -> NumLabels(); i++)
  200.         clone -> AddLabel(this -> Label(i));
  201.     clone -> nesting_level = this -> nesting_level;
  202.     clone -> left_brace_token = this -> left_brace_token;
  203.     if (this -> NumStatements() == 0)
  204.         clone -> block_statements = NULL;
  205.     else
  206.     {
  207.         for (int j = 0; j < this -> NumStatements(); j++)
  208.             clone -> AddStatement(this -> Statement(j) -> Clone(ast_pool));
  209.     }
  210.     clone -> right_brace_token = this -> right_brace_token;
  211.  
  212.     return clone;
  213. }
  214.  
  215. Ast *AstPrimitiveType::Clone(StoragePool *ast_pool)
  216. {
  217.     AstPrimitiveType *clone = ast_pool -> GenPrimitiveType(this -> kind, this -> primitive_kind_token);
  218.  
  219.     return clone;
  220. }
  221.  
  222. Ast *AstArrayType::Clone(StoragePool *ast_pool)
  223. {
  224.     AstArrayType *clone = ast_pool -> GenArrayType();
  225.  
  226.     clone -> type = this -> type -> Clone(ast_pool);
  227.     clone -> AllocateBrackets(this -> NumBrackets());
  228.     for (int i = 0; i < this -> NumBrackets(); i++)
  229.         clone -> AddBrackets((AstBrackets *) this -> Brackets(i) -> Clone(ast_pool));
  230.  
  231.     return clone;
  232. }
  233.  
  234. Ast *AstSimpleName::Clone(StoragePool *ast_pool)
  235. {
  236.     AstSimpleName *clone = ast_pool -> GenSimpleName(this -> identifier_token);
  237.     clone -> resolution_opt = (AstExpression *) (this -> resolution_opt ? this -> resolution_opt -> Clone(ast_pool) : NULL);
  238.  
  239.     return clone;
  240. }
  241.  
  242. Ast *AstPackageDeclaration::Clone(StoragePool *ast_pool)
  243. {
  244.     AstPackageDeclaration *clone = ast_pool -> GenPackageDeclaration();
  245.  
  246.     clone -> package_token = this -> package_token;
  247.     clone -> name = (AstExpression *) this -> name -> Clone(ast_pool);
  248.     clone -> semicolon_token = this -> semicolon_token;
  249.  
  250.     return clone;
  251. }
  252.  
  253. Ast *AstImportDeclaration::Clone(StoragePool *ast_pool)
  254. {
  255.     AstImportDeclaration *clone = ast_pool -> GenImportDeclaration();
  256.  
  257.     clone -> import_token = this -> import_token;
  258.     clone -> name = (AstExpression *) this -> name -> Clone(ast_pool);
  259.     clone -> star_token_opt = this -> star_token_opt;
  260.     clone -> semicolon_token = this -> semicolon_token;
  261.  
  262.     return clone;
  263. }
  264.  
  265. Ast *AstCompilationUnit::Clone(StoragePool *ast_pool)
  266. {
  267.     AstCompilationUnit *clone = ast_pool -> GenCompilationUnit();
  268.  
  269.     clone -> package_declaration_opt = (AstPackageDeclaration *)
  270.                                        (this -> package_declaration_opt
  271.                                               ? this -> package_declaration_opt -> Clone(ast_pool) : NULL);
  272.     for (int i = 0; i < this -> NumImportDeclarations(); i++)
  273.         clone -> AddImportDeclaration((AstImportDeclaration *) this -> ImportDeclaration(i) -> Clone(ast_pool));
  274.     for (int k = 0; k < this -> NumTypeDeclarations(); k++)
  275.         clone -> AddTypeDeclaration(this -> TypeDeclaration(k) -> Clone(ast_pool));
  276.  
  277.     return clone;
  278. }
  279.  
  280. Ast *AstModifier::Clone(StoragePool *ast_pool)
  281. {
  282.     AstModifier *clone = ast_pool -> GenModifier(this -> kind, this -> modifier_kind_token);
  283.  
  284.     return clone;
  285. }
  286.  
  287. Ast *AstEmptyDeclaration::Clone(StoragePool *ast_pool)
  288. {
  289.     AstEmptyDeclaration *clone = ast_pool -> GenEmptyDeclaration(this -> semicolon_token);
  290.  
  291.     return clone;
  292. }
  293.  
  294. Ast *AstClassBody::Clone(StoragePool *ast_pool)
  295. {
  296.     AstClassBody *clone = ast_pool -> GenClassBody();
  297.  
  298.     clone -> left_brace_token = this -> left_brace_token;
  299.     for (int i = 0; i < this -> NumClassBodyDeclarations(); i++)
  300.         clone -> AddClassBodyDeclaration(this -> ClassBodyDeclaration(i) -> Clone(ast_pool));
  301.     clone -> right_brace_token = this -> right_brace_token;
  302.  
  303.     return clone;
  304. }
  305.  
  306. Ast *AstClassDeclaration::Clone(StoragePool *ast_pool)
  307. {
  308.     AstClassDeclaration *clone = ast_pool -> GenClassDeclaration();
  309.  
  310.     for (int i = 0; i < this -> NumClassModifiers(); i++)
  311.         clone -> AddClassModifier((AstModifier *) this -> ClassModifier(i) -> Clone(ast_pool));
  312.     clone -> class_token = this -> class_token;
  313.     clone -> identifier_token = this -> identifier_token;
  314.     clone -> super_opt = (Ast *) (this -> super_opt ? this -> super_opt -> Clone(ast_pool) : NULL);
  315.     for (int k = 0; k < this -> NumInterfaces(); k++)
  316.         clone -> AddInterface((AstExpression *) this -> Interface(k) -> Clone(ast_pool));
  317.     clone -> class_body = (AstClassBody *) this -> class_body -> Clone(ast_pool);
  318.  
  319.     return clone;
  320. }
  321.  
  322. Ast *AstArrayInitializer::Clone(StoragePool *ast_pool)
  323. {
  324.     AstArrayInitializer *clone = ast_pool -> GenArrayInitializer();
  325.  
  326.     clone -> left_brace_token = this -> left_brace_token;
  327.     for (int k = 0; k < this -> NumVariableInitializers(); k++)
  328.         clone -> AddVariableInitializer(this -> VariableInitializer(k) -> Clone(ast_pool));
  329.     clone -> right_brace_token = this -> right_brace_token;
  330.  
  331.     return clone;
  332. }
  333.  
  334. Ast *AstBrackets::Clone(StoragePool *ast_pool)
  335. {
  336.     AstBrackets *clone = ast_pool -> GenBrackets(this -> left_bracket_token, this -> right_bracket_token);
  337.  
  338.     return clone;
  339. }
  340.  
  341. Ast *AstVariableDeclaratorId::Clone(StoragePool *ast_pool)
  342. {
  343.     AstVariableDeclaratorId *clone = ast_pool -> GenVariableDeclaratorId();
  344.  
  345.     clone -> identifier_token = this -> identifier_token;
  346.     clone -> AllocateBrackets(this -> NumBrackets());
  347.     for (int i = 0; i < this -> NumBrackets(); i++)
  348.         clone -> AddBrackets((AstBrackets *) this -> Brackets(i) -> Clone(ast_pool));
  349.  
  350.     return clone;
  351. }
  352.  
  353. Ast *AstVariableDeclarator::Clone(StoragePool *ast_pool)
  354. {
  355.     AstVariableDeclarator *clone = ast_pool -> GenVariableDeclarator();
  356.  
  357.     clone -> variable_declarator_name = (AstVariableDeclaratorId *) this -> variable_declarator_name -> Clone(ast_pool);
  358.     clone -> variable_initializer_opt = (Ast *) (this -> variable_initializer_opt
  359.                                                        ? this -> variable_initializer_opt -> Clone(ast_pool)
  360.                                                        : NULL);
  361.  
  362.     return clone;
  363. }
  364.  
  365. Ast *AstFieldDeclaration::Clone(StoragePool *ast_pool)
  366. {
  367.     AstFieldDeclaration *clone = ast_pool -> GenFieldDeclaration();
  368.  
  369.     for (int i = 0; i < this -> NumVariableModifiers(); i++)
  370.         clone -> AddVariableModifier((AstModifier *) this -> VariableModifier(i) -> Clone(ast_pool));
  371.     clone -> type = this -> type -> Clone(ast_pool);
  372.     for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  373.         clone -> AddVariableDeclarator((AstVariableDeclarator *) this -> VariableDeclarator(k) -> Clone(ast_pool));
  374.     clone -> semicolon_token = this -> semicolon_token;
  375.  
  376.     return clone;
  377. }
  378.  
  379. Ast *AstFormalParameter::Clone(StoragePool *ast_pool)
  380. {
  381.     AstFormalParameter *clone = ast_pool -> GenFormalParameter();
  382.  
  383.     if (this -> NumParameterModifiers() == 0)
  384.         clone -> parameter_modifiers = NULL;
  385.     else
  386.     {
  387.         for (int i = 0; i < this -> NumParameterModifiers(); i++)
  388.             clone -> AddParameterModifier((AstModifier *) this -> ParameterModifier(i) -> Clone(ast_pool));
  389.     }
  390.     clone -> type = this -> type -> Clone(ast_pool);
  391.     clone -> formal_declarator = (AstVariableDeclarator *) this -> formal_declarator -> Clone(ast_pool);
  392.  
  393.     return clone;
  394. }
  395.  
  396. Ast *AstMethodDeclarator::Clone(StoragePool *ast_pool)
  397. {
  398.     AstMethodDeclarator *clone = ast_pool -> GenMethodDeclarator();
  399.  
  400.     clone -> identifier_token = this -> identifier_token;
  401.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  402.     clone -> AllocateFormalParameters(this -> NumFormalParameters());
  403.     for (int i = 0; i < this -> NumFormalParameters(); i++)
  404.         clone -> AddFormalParameter((AstFormalParameter *) this -> FormalParameter(i) -> Clone(ast_pool));
  405.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  406.     clone -> AllocateBrackets(this -> NumBrackets());
  407.     for (int k = 0; k < this -> NumBrackets(); k++)
  408.         clone -> AddBrackets((AstBrackets *) this -> Brackets(k) -> Clone(ast_pool));
  409.  
  410.     return clone;
  411. }
  412.  
  413. Ast *AstMethodDeclaration::Clone(StoragePool *ast_pool)
  414. {
  415.     AstMethodDeclaration *clone = ast_pool -> GenMethodDeclaration();
  416.  
  417.     for (int i = 0; i < this -> NumMethodModifiers(); i++)
  418.         clone -> AddMethodModifier((AstModifier *) this -> MethodModifier(i) -> Clone(ast_pool));
  419.     clone -> type = this -> type -> Clone(ast_pool);
  420.     clone -> method_declarator = (AstMethodDeclarator *) this -> method_declarator -> Clone(ast_pool);
  421.     for (int k = 0; k < this -> NumThrows(); k++)
  422.         clone -> AddThrow((AstExpression *) this -> Throw(k) -> Clone(ast_pool));
  423.     clone -> method_body = (AstStatement *) this -> method_body -> Clone(ast_pool);
  424.  
  425.     return clone;
  426. }
  427.  
  428. Ast *AstStaticInitializer::Clone(StoragePool *ast_pool)
  429. {
  430.     AstStaticInitializer *clone = ast_pool -> GenStaticInitializer();
  431.  
  432.     clone -> static_token = this -> static_token;
  433.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  434.  
  435.     return clone;
  436. }
  437.  
  438. Ast *AstThisCall::Clone(StoragePool *ast_pool)
  439. {
  440.     AstThisCall *clone = ast_pool -> GenThisCall();
  441.  
  442.     clone -> this_token = this -> this_token;
  443.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  444.     clone -> AllocateArguments(this -> NumArguments());
  445.     for (int i = 0; i < this -> NumArguments(); i++)
  446.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  447.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  448.     clone -> semicolon_token = this -> semicolon_token;
  449.  
  450.     return clone;
  451. }
  452.  
  453. Ast *AstSuperCall::Clone(StoragePool *ast_pool)
  454. {
  455.     AstSuperCall *clone = ast_pool -> GenSuperCall();
  456.  
  457.     clone -> base_opt = (AstExpression *) (this -> base_opt ? this -> base_opt -> Clone(ast_pool) : NULL);
  458.     clone -> dot_token_opt = this -> dot_token_opt;
  459.     clone -> super_token = this -> super_token;
  460.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  461.     clone -> AllocateArguments(this -> NumArguments());
  462.     for (int i = 0; i < this -> NumArguments(); i++)
  463.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  464.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  465.     clone -> semicolon_token = this -> semicolon_token;
  466.     clone -> AllocateLocalArguments(this -> NumLocalArguments());
  467.     for (int k = 0; k < this -> NumLocalArguments(); k++)
  468.         clone -> AddLocalArgument((AstExpression *) this -> LocalArgument(k) -> Clone(ast_pool));
  469.  
  470.     return clone;
  471. }
  472.  
  473. Ast *AstConstructorBlock::Clone(StoragePool *ast_pool)
  474. {
  475.     AstConstructorBlock *clone = ast_pool -> GenConstructorBlock();
  476.  
  477.     clone -> left_brace_token = this -> left_brace_token;
  478.     clone -> explicit_constructor_invocation_opt = (Ast *)
  479.                                                    (this -> explicit_constructor_invocation_opt
  480.                                                           ? this -> explicit_constructor_invocation_opt -> Clone(ast_pool)
  481.                                                           : NULL);
  482.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  483.     clone -> right_brace_token = this -> right_brace_token;
  484.  
  485.     return clone;
  486. }
  487.  
  488. Ast *AstConstructorDeclaration::Clone(StoragePool *ast_pool)
  489. {
  490.     AstConstructorDeclaration *clone = ast_pool -> GenConstructorDeclaration();
  491.  
  492.     for (int i = 0; i < this -> NumConstructorModifiers(); i++)
  493.         clone -> AddConstructorModifier((AstModifier *) this -> ConstructorModifier(i) -> Clone(ast_pool));
  494.     clone -> constructor_declarator = (AstMethodDeclarator *) this -> constructor_declarator -> Clone(ast_pool);
  495.     for (int k = 0; k < this -> NumThrows(); k++)
  496.         clone -> AddThrow((AstExpression *) this -> Throw(k) -> Clone(ast_pool));
  497.     clone -> constructor_body = (AstConstructorBlock *) this -> constructor_body -> Clone(ast_pool);
  498.  
  499.     return clone;
  500. }
  501.  
  502. Ast *AstInterfaceDeclaration::Clone(StoragePool *ast_pool)
  503. {
  504.     AstInterfaceDeclaration *clone = ast_pool -> GenInterfaceDeclaration();
  505.  
  506.     for (int i = 0; i < this -> NumInterfaceModifiers(); i++)
  507.         clone -> AddInterfaceModifier((AstModifier *) this -> InterfaceModifier(i) -> Clone(ast_pool));
  508.     clone -> interface_token = this -> interface_token;
  509.     clone -> identifier_token = this -> identifier_token;
  510.     for (int k = 0; k < this -> NumExtendsInterfaces(); k++)
  511.         clone -> AddExtendsInterface((AstExpression *) this -> ExtendsInterface(k) -> Clone(ast_pool));
  512.     clone -> left_brace_token = this -> left_brace_token;
  513.     for (int l = 0; l < this -> NumExtendsInterfaces(); l++)
  514.         clone -> AddInterfaceMemberDeclaration((AstExpression *) this -> InterfaceMemberDeclaration(l) -> Clone(ast_pool));
  515.     clone -> right_brace_token = this -> right_brace_token;
  516.  
  517.     return clone;
  518. }
  519.  
  520. Ast *AstLocalVariableDeclarationStatement::Clone(StoragePool *ast_pool)
  521. {
  522.     AstLocalVariableDeclarationStatement *clone = ast_pool -> GenLocalVariableDeclarationStatement();
  523.  
  524.     for (int i = 0; i < this -> NumLocalModifiers(); i++)
  525.         clone -> AddLocalModifier((AstModifier *) this -> LocalModifier(i) -> Clone(ast_pool));
  526.     clone -> type = this -> type -> Clone(ast_pool);
  527.     for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  528.         clone -> AddVariableDeclarator((AstVariableDeclarator *) this -> VariableDeclarator(k) -> Clone(ast_pool));
  529.     clone -> semicolon_token_opt = this -> semicolon_token_opt;
  530.  
  531.     return clone;
  532. }
  533.  
  534. Ast *AstIfStatement::Clone(StoragePool *ast_pool)
  535. {
  536.     AstIfStatement *clone = ast_pool -> GenIfStatement();
  537.  
  538.     clone -> if_token = this -> if_token;
  539.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  540.     clone -> true_statement = (AstStatement *) this -> true_statement -> Clone(ast_pool);
  541.     clone -> false_statement_opt = (AstStatement *)
  542.                                    (this -> false_statement_opt
  543.                                           ? this -> false_statement_opt -> Clone(ast_pool)
  544.                                           : NULL);
  545.  
  546.     return clone;
  547. }
  548.  
  549. Ast *AstEmptyStatement::Clone(StoragePool *ast_pool)
  550. {
  551.     AstEmptyStatement *clone = ast_pool -> GenEmptyStatement(this -> semicolon_token);
  552.  
  553.     return clone;
  554. }
  555.  
  556. Ast *AstExpressionStatement::Clone(StoragePool *ast_pool)
  557. {
  558.     AstExpressionStatement *clone = ast_pool -> GenExpressionStatement();
  559.  
  560.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  561.     clone -> semicolon_token_opt = this -> semicolon_token_opt;
  562.  
  563.     return clone;
  564. }
  565.  
  566. Ast *AstCaseLabel::Clone(StoragePool *ast_pool)
  567. {
  568.     AstCaseLabel *clone = ast_pool -> GenCaseLabel();
  569.  
  570.     clone -> case_token = this -> case_token;
  571.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  572.     clone -> colon_token = this -> colon_token;
  573.     clone -> map_index = this -> map_index;
  574.  
  575.     return clone;
  576. }
  577.  
  578. Ast *AstDefaultLabel::Clone(StoragePool *ast_pool)
  579. {
  580.     AstDefaultLabel *clone = ast_pool -> GenDefaultLabel();
  581.  
  582.     clone -> default_token = this -> default_token;
  583.     clone -> colon_token = this -> colon_token;
  584.  
  585.     return clone;
  586. }
  587.  
  588. Ast *AstSwitchBlockStatement::Clone(StoragePool *ast_pool)
  589. {
  590.     AstSwitchBlockStatement *clone = ast_pool -> GenSwitchBlockStatement();
  591.  
  592.     clone -> AllocateSwitchLabels(this -> NumSwitchLabels());
  593.     for (int i = 0; i < this -> NumSwitchLabels(); i++)
  594.         clone -> AddSwitchLabel(this -> SwitchLabel(i) -> Clone(ast_pool));
  595.  
  596.     clone -> AllocateBlockStatements(this -> NumStatements());
  597.     for (int k = 0; k < this -> NumStatements(); k++)
  598.         clone -> AddStatement((AstStatement *) this -> Statement(k) -> Clone(ast_pool));
  599.  
  600.     return clone;
  601. }
  602.  
  603. Ast *AstSwitchStatement::Clone(StoragePool *ast_pool)
  604. {
  605.     AstSwitchStatement *clone = ast_pool -> GenSwitchStatement();
  606.  
  607.     clone -> switch_token = this -> switch_token;
  608.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  609.     clone -> switch_block = (AstBlock *) this -> switch_block -> Clone(ast_pool);
  610.  
  611.     return clone;
  612. }
  613.  
  614. Ast *AstWhileStatement::Clone(StoragePool *ast_pool)
  615. {
  616.     AstWhileStatement *clone = ast_pool -> GenWhileStatement();
  617.  
  618.     clone -> while_token = this -> while_token;
  619.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  620.     clone -> statement = (AstStatement *) this -> statement -> Clone(ast_pool);
  621.  
  622.     return clone;
  623. }
  624.  
  625. Ast *AstDoStatement::Clone(StoragePool *ast_pool)
  626. {
  627.     AstDoStatement *clone = ast_pool -> GenDoStatement();
  628.  
  629.     clone -> do_token = this -> do_token;
  630.     clone -> statement = (AstStatement *) this -> statement -> Clone(ast_pool);
  631.     clone -> while_token = this -> while_token;
  632.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  633.     clone -> semicolon_token = this -> semicolon_token;
  634.  
  635.     return clone;
  636. }
  637.  
  638. Ast *AstForStatement::Clone(StoragePool *ast_pool)
  639. {
  640.     AstForStatement *clone = ast_pool -> GenForStatement();
  641.  
  642.     clone -> for_token = this -> for_token;
  643.     for (int i = 0; i < this -> NumForInitStatements(); i++)
  644.         clone -> AddForInitStatement((AstStatement *) this -> ForInitStatement(i) -> Clone(ast_pool));
  645.     clone -> end_expression_opt = (AstExpression *)
  646.                                   (this -> end_expression_opt
  647.                                          ? this -> end_expression_opt -> Clone(ast_pool)
  648.                                          : NULL);
  649.     for (int k = 0; k < this -> NumForUpdateStatements(); k++)
  650.         clone -> AddForUpdateStatement((AstExpressionStatement *) this -> ForUpdateStatement(k) -> Clone(ast_pool));
  651.     clone -> statement = (AstStatement *) this -> statement -> Clone(ast_pool);
  652.  
  653.     return clone;
  654. }
  655.  
  656. Ast *AstBreakStatement::Clone(StoragePool *ast_pool)
  657. {
  658.     AstBreakStatement *clone = ast_pool -> GenBreakStatement();
  659.  
  660.     clone -> break_token = this -> break_token;
  661.     clone -> identifier_token_opt = this -> identifier_token_opt;
  662.     clone -> semicolon_token = this -> semicolon_token;
  663.     clone -> nesting_level = this -> nesting_level;
  664.  
  665.     return clone;
  666. }
  667.  
  668. Ast *AstContinueStatement::Clone(StoragePool *ast_pool)
  669. {
  670.     AstContinueStatement *clone = ast_pool -> GenContinueStatement();
  671.  
  672.     clone -> continue_token = this -> continue_token;
  673.     clone -> identifier_token_opt = this -> identifier_token_opt;
  674.     clone -> semicolon_token = this -> semicolon_token;
  675.     clone -> nesting_level = this -> nesting_level;
  676.  
  677.     return clone;
  678. }
  679.  
  680. Ast *AstReturnStatement::Clone(StoragePool *ast_pool)
  681. {
  682.     AstReturnStatement *clone = ast_pool -> GenReturnStatement();
  683.  
  684.     clone -> return_token = this -> return_token;
  685.     clone -> expression_opt = (AstExpression *) (this -> expression_opt ? this -> expression_opt -> Clone(ast_pool) : NULL);
  686.     clone -> semicolon_token = this -> semicolon_token;
  687.  
  688.     return clone;
  689. }
  690.  
  691. Ast *AstThrowStatement::Clone(StoragePool *ast_pool)
  692. {
  693.     AstThrowStatement *clone = ast_pool -> GenThrowStatement();
  694.  
  695.     clone -> throw_token = this -> throw_token;
  696.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  697.     clone -> semicolon_token = this -> semicolon_token;
  698.  
  699.     return clone;
  700. }
  701.  
  702. Ast *AstSynchronizedStatement::Clone(StoragePool *ast_pool)
  703. {
  704.     AstSynchronizedStatement *clone = ast_pool -> GenSynchronizedStatement();
  705.  
  706.     clone -> synchronized_token = this -> synchronized_token;
  707.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  708.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  709.  
  710.     return clone;
  711. }
  712.  
  713. Ast *AstCatchClause::Clone(StoragePool *ast_pool)
  714. {
  715.     AstCatchClause *clone = ast_pool -> GenCatchClause();
  716.  
  717.     clone -> catch_token = this -> catch_token;
  718.     clone -> formal_parameter = (AstFormalParameter *) this -> formal_parameter -> Clone(ast_pool);
  719.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  720.  
  721.     return clone;
  722. }
  723.  
  724. Ast *AstFinallyClause::Clone(StoragePool *ast_pool)
  725. {
  726.     AstFinallyClause *clone = ast_pool -> GenFinallyClause();
  727.  
  728.     clone -> finally_token = this -> finally_token;
  729.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  730.  
  731.     return clone;
  732. }
  733.  
  734. Ast *AstTryStatement::Clone(StoragePool *ast_pool)
  735. {
  736.     AstTryStatement *clone = ast_pool -> GenTryStatement();
  737.  
  738.     clone -> try_token = this -> try_token;
  739.     clone -> block = (AstBlock *) this -> block -> Clone(ast_pool);
  740.     for (int k = 0; k < this -> NumCatchClauses(); k++)
  741.         clone -> AddCatchClause((AstCatchClause *) this -> CatchClause(k) -> Clone(ast_pool));
  742.     clone -> finally_clause_opt = (AstFinallyClause *)
  743.                                   (this -> finally_clause_opt
  744.                                          ? this -> finally_clause_opt -> Clone(ast_pool)
  745.                                          : NULL);
  746.  
  747.     return clone;
  748. }
  749.  
  750. Ast *AstIntegerLiteral::Clone(StoragePool *ast_pool)
  751. {
  752.     AstIntegerLiteral *clone = ast_pool -> GenIntegerLiteral(this -> integer_literal_token);
  753.  
  754.     return clone;
  755. }
  756.  
  757. Ast *AstLongLiteral::Clone(StoragePool *ast_pool)
  758. {
  759.     AstLongLiteral *clone = ast_pool -> GenLongLiteral(this -> long_literal_token);
  760.  
  761.     return clone;
  762. }
  763.  
  764. Ast *AstFloatingPointLiteral::Clone(StoragePool *ast_pool)
  765. {
  766.     AstFloatingPointLiteral *clone = ast_pool -> GenFloatingPointLiteral(this -> floating_point_literal_token);
  767.  
  768.     return clone;
  769. }
  770.  
  771. Ast *AstDoubleLiteral::Clone(StoragePool *ast_pool)
  772. {
  773.     AstDoubleLiteral *clone = ast_pool -> GenDoubleLiteral(this -> double_literal_token);
  774.  
  775.     return clone;
  776. }
  777.  
  778. Ast *AstTrueLiteral::Clone(StoragePool *ast_pool)
  779. {
  780.     AstTrueLiteral *clone = ast_pool -> GenTrueLiteral(this -> true_literal_token);
  781.  
  782.     return clone;
  783. }
  784.  
  785. Ast *AstFalseLiteral::Clone(StoragePool *ast_pool)
  786. {
  787.     AstFalseLiteral *clone = ast_pool -> GenFalseLiteral(this -> false_literal_token);
  788.  
  789.     return clone;
  790. }
  791.  
  792. Ast *AstStringLiteral::Clone(StoragePool *ast_pool)
  793. {
  794.     AstStringLiteral *clone = ast_pool -> GenStringLiteral(this -> string_literal_token);
  795.  
  796.     return clone;
  797. }
  798.  
  799. Ast *AstCharacterLiteral::Clone(StoragePool *ast_pool)
  800. {
  801.     AstCharacterLiteral *clone = ast_pool -> GenCharacterLiteral(this -> character_literal_token);
  802.  
  803.     return clone;
  804. }
  805.  
  806. Ast *AstNullLiteral::Clone(StoragePool *ast_pool)
  807. {
  808.     AstNullLiteral *clone = ast_pool -> GenNullLiteral(this -> null_token);
  809.  
  810.     return clone;
  811. }
  812.  
  813. Ast *AstThisExpression::Clone(StoragePool *ast_pool)
  814. {
  815.     AstThisExpression *clone = ast_pool -> GenThisExpression(this -> this_token);
  816.  
  817.     return clone;
  818. }
  819.  
  820. Ast *AstSuperExpression::Clone(StoragePool *ast_pool)
  821. {
  822.     AstSuperExpression *clone = ast_pool -> GenSuperExpression(this -> super_token);
  823.  
  824.     return clone;
  825. }
  826.  
  827. Ast *AstParenthesizedExpression::Clone(StoragePool *ast_pool)
  828. {
  829.     AstParenthesizedExpression *clone = ast_pool -> GenParenthesizedExpression();
  830.  
  831.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  832.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  833.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  834.  
  835.     return clone;
  836. }
  837.  
  838. Ast *AstTypeExpression::Clone(StoragePool *ast_pool)
  839. {
  840.     AstTypeExpression *clone = ast_pool -> GenTypeExpression(this -> type -> Clone(ast_pool));
  841.  
  842.     return clone;
  843. }
  844.  
  845. Ast *AstClassInstanceCreationExpression::Clone(StoragePool *ast_pool)
  846. {
  847.     AstClassInstanceCreationExpression *clone = ast_pool -> GenClassInstanceCreationExpression();
  848.  
  849.     clone -> base_opt = (AstExpression *) (this -> base_opt ? this -> base_opt -> Clone(ast_pool) : NULL);
  850.     clone -> dot_token_opt = this -> dot_token_opt;
  851.     clone -> new_token = this -> new_token;
  852.     clone -> class_type = (AstTypeExpression *) this -> class_type -> Clone(ast_pool);
  853.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  854.     clone -> AllocateArguments(this -> NumArguments());
  855.     for (int i = 0; i < this -> NumArguments(); i++)
  856.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  857.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  858.     clone -> class_body_opt = (AstClassBody *) (this -> class_body_opt ? this -> class_body_opt -> Clone(ast_pool) : NULL);
  859.     clone -> AllocateLocalArguments(this -> NumLocalArguments());
  860.     for (int k = 0; k < this -> NumLocalArguments(); k++)
  861.         clone -> AddLocalArgument((AstExpression *) this -> LocalArgument(k) -> Clone(ast_pool));
  862.  
  863.     return clone;
  864. }
  865.  
  866. Ast *AstDimExpr::Clone(StoragePool *ast_pool)
  867. {
  868.     AstDimExpr *clone = ast_pool -> GenDimExpr();
  869.  
  870.     clone -> left_bracket_token = this -> left_bracket_token;
  871.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  872.     clone -> right_bracket_token = this -> right_bracket_token;
  873.  
  874.     return clone;
  875. }
  876.  
  877. Ast *AstArrayCreationExpression::Clone(StoragePool *ast_pool)
  878. {
  879.     AstArrayCreationExpression *clone = ast_pool -> GenArrayCreationExpression();
  880.  
  881.     clone -> new_token = this -> new_token;
  882.     clone -> array_type = this -> array_type -> Clone(ast_pool);
  883.     clone -> AllocateDimExprs(this -> NumDimExprs());
  884.     for (int i = 0; i < this -> NumDimExprs(); i++)
  885.         clone -> AddDimExpr((AstDimExpr *) this -> DimExpr(i) -> Clone(ast_pool));
  886.     clone -> AllocateBrackets(this -> NumBrackets());
  887.     for (int k = 0; k < this -> NumBrackets(); k++)
  888.         clone -> AddBrackets((AstBrackets *) this -> Brackets(k) -> Clone(ast_pool));
  889.     clone -> array_initializer_opt = (AstArrayInitializer *)
  890.                                      (this -> array_initializer_opt ? this -> array_initializer_opt -> Clone(ast_pool) : NULL);
  891.  
  892.     return clone;
  893. }
  894.  
  895. Ast *AstFieldAccess::Clone(StoragePool *ast_pool)
  896. {
  897.     AstFieldAccess *clone = ast_pool -> GenFieldAccess(this -> field_access_tag);
  898.  
  899.     clone -> base = (AstExpression *) this -> base -> Clone(ast_pool);
  900.     clone -> dot_token = this -> dot_token;
  901.     clone -> identifier_token = this -> identifier_token;
  902.     clone -> resolution_opt = (AstExpression *) (this -> resolution_opt ? this -> resolution_opt -> Clone(ast_pool) : NULL);
  903.  
  904.     return clone;
  905. }
  906.  
  907. Ast *AstMethodInvocation::Clone(StoragePool *ast_pool)
  908. {
  909.     AstMethodInvocation *clone = ast_pool -> GenMethodInvocation();
  910.  
  911.     clone -> method = (AstExpression *) this -> method -> Clone(ast_pool);
  912.     clone -> left_parenthesis_token = this -> left_parenthesis_token;
  913.     clone -> AllocateArguments(this -> NumArguments());
  914.     for (int i = 0; i < this -> NumArguments(); i++)
  915.         clone -> AddArgument((AstExpression *) this -> Argument(i) -> Clone(ast_pool));
  916.     clone -> right_parenthesis_token = this -> right_parenthesis_token;
  917.     clone -> resolution_opt = (AstExpression *) (this -> resolution_opt ? this -> resolution_opt -> Clone(ast_pool) : NULL);
  918.  
  919.     return clone;
  920. }
  921.  
  922. Ast *AstArrayAccess::Clone(StoragePool *ast_pool)
  923. {
  924.     AstArrayAccess *clone = ast_pool -> GenArrayAccess();
  925.  
  926.     clone -> base = (AstExpression *) this -> base -> Clone(ast_pool);
  927.     clone -> left_bracket_token = this -> left_bracket_token;
  928.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  929.     clone -> right_bracket_token = this -> right_bracket_token;
  930.  
  931.     return clone;
  932. }
  933.  
  934. Ast *AstPostUnaryExpression::Clone(StoragePool *ast_pool)
  935. {
  936.     AstPostUnaryExpression *clone = ast_pool -> GenPostUnaryExpression(this -> post_unary_tag);
  937.  
  938.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  939.     clone -> post_operator_token = this -> post_operator_token;
  940.  
  941.     return clone;
  942. }
  943.  
  944. Ast *AstPreUnaryExpression::Clone(StoragePool *ast_pool)
  945. {
  946.     AstPreUnaryExpression *clone = ast_pool -> GenPreUnaryExpression(this -> pre_unary_tag);
  947.  
  948.     clone -> pre_operator_token = this -> pre_operator_token;
  949.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  950.  
  951.     return clone;
  952. }
  953.  
  954. Ast *AstCastExpression::Clone(StoragePool *ast_pool)
  955. {
  956.     AstCastExpression *clone = ast_pool -> GenCastExpression();
  957.  
  958.     clone -> left_parenthesis_token_opt = this -> left_parenthesis_token_opt;
  959.     clone -> type_opt = (Ast *) (this -> type_opt ? this -> type_opt -> Clone(ast_pool) : NULL);
  960.     clone -> AllocateBrackets(this -> NumBrackets());
  961.     for (int i = 0; i < this -> NumBrackets(); i++)
  962.         clone -> AddBrackets((AstBrackets *) this -> Brackets(i) -> Clone(ast_pool));
  963.     clone -> right_parenthesis_token_opt = this -> right_parenthesis_token_opt;
  964.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  965.  
  966.     return clone;
  967. }
  968.  
  969. Ast *AstBinaryExpression::Clone(StoragePool *ast_pool)
  970. {
  971.     AstBinaryExpression *clone = ast_pool -> GenBinaryExpression(this -> binary_tag);
  972.  
  973.     clone -> left_expression = (AstExpression *) this -> left_expression -> Clone(ast_pool);
  974.     clone -> binary_operator_token = this -> binary_operator_token;
  975.     clone -> right_expression = (AstExpression *) this -> right_expression -> Clone(ast_pool);
  976.  
  977.     return clone;
  978. }
  979.  
  980. Ast *AstConditionalExpression::Clone(StoragePool *ast_pool)
  981. {
  982.     AstConditionalExpression *clone = ast_pool -> GenConditionalExpression();
  983.  
  984.     clone -> test_expression = (AstExpression *) this -> test_expression -> Clone(ast_pool);
  985.     clone -> question_token = this -> question_token;
  986.     clone -> true_expression = (AstExpression *) this -> true_expression -> Clone(ast_pool);
  987.     clone -> colon_token = this -> colon_token;
  988.     clone -> false_expression = (AstExpression *) this -> false_expression -> Clone(ast_pool);
  989.  
  990.     return clone;
  991. }
  992.  
  993. Ast *AstAssignmentExpression::Clone(StoragePool *ast_pool)
  994. {
  995.     AstAssignmentExpression *clone = ast_pool -> GenAssignmentExpression(this -> assignment_tag, this -> assignment_operator_token);
  996.  
  997.     clone -> left_hand_side = (AstExpression *) this -> left_hand_side -> Clone(ast_pool);
  998.     clone -> expression = (AstExpression *) this -> expression -> Clone(ast_pool);
  999.  
  1000.     return clone;
  1001. }
  1002.  
  1003. #ifdef TEST
  1004.     void Ast::Print(LexStream& lex_stream)
  1005.     {
  1006.         Coutput << "#" << this -> id << " (Ast):  "
  1007.                 << "Node number " << (int) kind << " does not contain a print routine\n";
  1008.     }
  1009.  
  1010.     void AstBlock::Print(LexStream& lex_stream)
  1011.     {
  1012.         Coutput << "#" << this -> id << " (";
  1013.         for (int i = 0; i < this -> NumLabels(); i++)
  1014.         {
  1015.              Coutput << lex_stream.NameString(this -> Label(i))
  1016.                      << ": ";
  1017.         }
  1018.         Coutput << "Block at level " << nesting_level;
  1019.         if (block_symbol)
  1020.              Coutput << ", max_variable_index " << block_symbol -> max_variable_index
  1021.                      << ", try_or_synchronized_variable_index " << block_symbol -> try_or_synchronized_variable_index;
  1022.         else Coutput << ", BLOCK_SYMBOL NOT SET";
  1023.         Coutput << ")";
  1024.  
  1025.         if (NumStatements() > 0)
  1026.         {
  1027.             Coutput << "    {";
  1028.             for (int j = 0; j < this -> NumStatements(); j++)
  1029.             {
  1030.                 if (j % 10 == 0)
  1031.                     Coutput << "\n        ";
  1032.                 Coutput << " #" << this -> Statement(j) -> id;
  1033.             }
  1034.             Coutput << "    }\n";
  1035.             for (int k = 0; k < this -> NumStatements(); k++)
  1036.                 this -> Statement(k) -> Print(lex_stream);
  1037.         }
  1038.         else
  1039.          Coutput <<"\n";
  1040.     }
  1041.  
  1042.     void AstPrimitiveType::Print(LexStream& lex_stream)
  1043.     {
  1044.         Coutput << "#" << this -> id << " (PrimitiveType):  "
  1045.                 << lex_stream.NameString(primitive_kind_token)
  1046.                 << "\n";
  1047.     }
  1048.  
  1049.     void AstArrayType::Print(LexStream& lex_stream)
  1050.     {
  1051.         Coutput << "#" << this -> id << " (ArrayType):  "
  1052.                 << "#" << type -> id;
  1053.         for (int i = 0; i < this -> NumBrackets(); i++)
  1054.              Coutput << " []";
  1055.         Coutput << "\n";
  1056.         type -> Print(lex_stream);
  1057.     }
  1058.  
  1059.     void AstSimpleName::Print(LexStream& lex_stream)
  1060.     {
  1061.         Coutput << "#" << this -> id << " (SimpleName):  "
  1062.                 << lex_stream.NameString(identifier_token)
  1063.                 << "\n";
  1064.     }
  1065.  
  1066.     void AstPackageDeclaration::Print(LexStream& lex_stream)
  1067.     {
  1068.         Coutput << "#" << this -> id << " (PackageDeclaration):  "
  1069.                 << lex_stream.NameString(package_token)
  1070.                 << " #" << name -> id << "\n";
  1071.         name -> Print(lex_stream);
  1072.     }
  1073.  
  1074.     void AstImportDeclaration::Print(LexStream& lex_stream)
  1075.     {
  1076.         Coutput << "#" << this -> id << " (ImportDeclaration):  "
  1077.                 << lex_stream.NameString(import_token)
  1078.                 << " #" << name -> id << (star_token_opt ? "." : "")
  1079.                 << (star_token_opt ? lex_stream.NameString(star_token_opt) : L"")
  1080.                 << "\n";
  1081.         name -> Print(lex_stream);
  1082.     }
  1083.  
  1084.     void AstCompilationUnit::Print(LexStream& lex_stream)
  1085.     {
  1086.         Coutput << "\nAST structure for "
  1087.                 << lex_stream.FileName()
  1088.                 << ":\n\n"
  1089.                 << "#" << this -> id << " (CompilationUnit):  "
  1090.                 << "#" << (package_declaration_opt ? package_declaration_opt -> id : 0)
  1091.                 << " (";
  1092.         for (int i = 0; i < this -> NumImportDeclarations(); i++)
  1093.             Coutput << " #" << this -> ImportDeclaration(i) -> id;
  1094.         Coutput << " ) (";
  1095.         for (int k = 0; k < this -> NumTypeDeclarations(); k++)
  1096.             Coutput << " #" << this -> TypeDeclaration(k) -> id;
  1097.         Coutput << ")\n";
  1098.  
  1099.         if (package_declaration_opt)
  1100.             package_declaration_opt -> Print(lex_stream);
  1101.         for (int m = 0; m < this -> NumImportDeclarations(); m++)
  1102.             this -> ImportDeclaration(m) -> Print(lex_stream);
  1103.         for (int n = 0; n < this -> NumTypeDeclarations(); n++)
  1104.             this -> TypeDeclaration(n) -> Print(lex_stream);
  1105.     }
  1106.  
  1107.     void AstModifier::Print(LexStream& lex_stream)
  1108.     {
  1109.         Coutput << "#" << this -> id << " (Modifier):  "
  1110.                 << lex_stream.NameString(modifier_kind_token)
  1111.                 << "\n";
  1112.     }
  1113.  
  1114.     void AstEmptyDeclaration::Print(LexStream& lex_stream)
  1115.     {
  1116.         Coutput << "#" << this -> id << " (EmptyDeclaration):  "
  1117.                 << lex_stream.NameString(semicolon_token)
  1118.                 << "\n";
  1119.     }
  1120.  
  1121.     void AstClassBody::Print(LexStream& lex_stream)
  1122.     {
  1123.         Coutput << "#" << this -> id << " (ClassBody):  "
  1124.                 << "\n    {";
  1125.         for (int i = 0; i < this -> NumClassBodyDeclarations(); i++)
  1126.         {
  1127.             if (i % 10 == 0)
  1128.                  Coutput << "\n       ";
  1129.             Coutput << " #" << this -> ClassBodyDeclaration(i) -> id;
  1130.         }
  1131.         Coutput << "\n    }\n";
  1132.  
  1133.         for (int k = 0; k < this -> NumClassBodyDeclarations(); k++)
  1134.             this -> ClassBodyDeclaration(k) -> Print(lex_stream);
  1135.     }
  1136.  
  1137.     void AstClassDeclaration::Print(LexStream& lex_stream)
  1138.     {
  1139.         Coutput << "#" << this -> id << " (ClassDeclaration):  ";
  1140.         for (int i = 0; i < this -> NumClassModifiers(); i++)
  1141.         {
  1142.             Coutput << lex_stream.NameString(this -> ClassModifier(i) -> modifier_kind_token)
  1143.                     << " ";
  1144.         }
  1145.         Coutput << lex_stream.NameString(class_token)
  1146.                 << " "
  1147.                 << lex_stream.NameString(identifier_token)
  1148.                 << " #" << (super_opt ? super_opt -> id : 0)
  1149.                 << "(";
  1150.         for (int j = 0; j < NumInterfaces(); j++)
  1151.             Coutput << " #" << this -> Interface(j) -> id;
  1152.         Coutput << ") #" << class_body -> id << "\n";
  1153.  
  1154.         if (super_opt)
  1155.             super_opt -> Print(lex_stream);
  1156.         for (int k = 0; k < NumInterfaces(); k++)
  1157.             this -> Interface(k) -> Print(lex_stream);
  1158.         class_body -> Print(lex_stream);
  1159.     }
  1160.  
  1161.     void AstArrayInitializer::Print(LexStream& lex_stream)
  1162.     {
  1163.         Coutput << "#" << this -> id << " (ArrayInitializer):  "
  1164.                 << "\n    {";
  1165.         for (int i = 0; i < NumVariableInitializers(); i++)
  1166.         {
  1167.             if (i % 10 == 0)
  1168.                  Coutput << "\n       ";
  1169.             Coutput << " #" << this -> VariableInitializer(i) -> id;
  1170.         }
  1171.         Coutput << "\n    }\n";
  1172.  
  1173.         for (int k = 0; k < NumVariableInitializers(); k++)
  1174.             this -> VariableInitializer(k) -> Print(lex_stream);
  1175.     }
  1176.  
  1177.     void AstBrackets::Print(LexStream& lex_stream)
  1178.     {
  1179.         Coutput << "#" << this -> id << " (Brackets):  []" << "\n";
  1180.     }
  1181.  
  1182.     void AstVariableDeclaratorId::Print(LexStream& lex_stream)
  1183.     {
  1184.         Coutput << "#" << this -> id << " (VariableDeclaratorId):  "
  1185.                 << lex_stream.NameString(identifier_token);
  1186.         for (int i = 0; i < NumBrackets(); i++)
  1187.              Coutput << " []";
  1188.         Coutput << "\n";
  1189.     }
  1190.  
  1191.     void AstVariableDeclarator::Print(LexStream& lex_stream)
  1192.     {
  1193.         Coutput << "#" << this -> id << " (VariableDeclarator):  " << "#" << variable_declarator_name -> id << " #" <<
  1194.                    (variable_initializer_opt ? variable_initializer_opt -> id : 0) << "\n";
  1195.         variable_declarator_name -> Print(lex_stream);
  1196.         if (variable_initializer_opt)
  1197.             variable_initializer_opt -> Print(lex_stream);
  1198.  
  1199.     }
  1200.  
  1201.     void AstFieldDeclaration::Print(LexStream& lex_stream)
  1202.     {
  1203.         Coutput << "#" << this -> id << " (FieldDeclaration):  ";
  1204.         for (int i = 0; i < this -> NumVariableModifiers(); i++)
  1205.         {
  1206.             Coutput << lex_stream.NameString(this -> VariableModifier(i) -> modifier_kind_token)
  1207.                     << " ";
  1208.         }
  1209.         Coutput << " #" << type -> id
  1210.                 << "(";
  1211.         for (int j = 0; j < this -> NumVariableDeclarators(); j++)
  1212.             Coutput << " #" << this -> VariableDeclarator(j) -> id;
  1213.         Coutput << ") \n";
  1214.  
  1215.         type -> Print(lex_stream);
  1216.         for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  1217.             this -> VariableDeclarator(k) -> Print(lex_stream);
  1218.     }
  1219.  
  1220.     void AstFormalParameter::Print(LexStream& lex_stream)
  1221.     {
  1222.         Coutput << "#" << this -> id << " (FormalParameter):  ";
  1223.         for (int i = 0; i < this -> NumParameterModifiers(); i++)
  1224.         {
  1225.             Coutput << lex_stream.NameString(this -> ParameterModifier(i) -> modifier_kind_token)
  1226.                     << " ";
  1227.         }
  1228.         Coutput << "#" << type -> id
  1229.                 << " #" << formal_declarator -> id << "\n";
  1230.         type -> Print(lex_stream);
  1231.         formal_declarator -> Print(lex_stream);
  1232.     }
  1233.  
  1234.     void AstMethodDeclarator::Print(LexStream& lex_stream)
  1235.     {
  1236.         Coutput << "#" << this -> id << " (MethodDeclarator):  "
  1237.                 << lex_stream.NameString(identifier_token)
  1238.                 << " (";
  1239.         for (int k = 0; k < this -> NumFormalParameters(); k++)
  1240.             Coutput << " #" << this -> FormalParameter(k) -> id;
  1241.         Coutput << " )";
  1242.         for (int i = 0; i < NumBrackets(); i++)
  1243.              Coutput << " []";
  1244.         Coutput <<  "\n";
  1245.  
  1246.         for (int j = 0; j < this -> NumFormalParameters(); j++)
  1247.             this -> FormalParameter(j) -> Print(lex_stream);
  1248.     }
  1249.  
  1250.     void AstMethodDeclaration::Print(LexStream& lex_stream)
  1251.     {
  1252.         Coutput << "#" << this -> id << " (MethodDeclaration):  ";
  1253.         for (int i = 0; i < this -> NumMethodModifiers(); i++)
  1254.         {
  1255.             Coutput << lex_stream.NameString(this -> MethodModifier(i) -> modifier_kind_token)
  1256.                     << " ";
  1257.         }
  1258.         Coutput << " #" << type -> id
  1259.                 << " #" << method_declarator -> id
  1260.                 << " throws: (";
  1261.         for (int j = 0; j < this -> NumThrows(); j++)
  1262.             Coutput << " #" << this -> Throw(j) -> id;
  1263.         Coutput << ") #" << method_body -> id << "\n";
  1264.  
  1265.         type -> Print(lex_stream);
  1266.         method_declarator -> Print(lex_stream);
  1267.         for (int k = 0; k < this -> NumThrows(); k++)
  1268.             this -> Throw(k) -> Print(lex_stream);
  1269.         method_body -> Print(lex_stream);
  1270.     }
  1271.  
  1272.     void AstStaticInitializer::Print(LexStream& lex_stream)
  1273.     {
  1274.         Coutput << "#" << this -> id << " (StaticInitializer):  "
  1275.                 << lex_stream.NameString(static_token)
  1276.                 << " #" << block -> id << "\n";
  1277.         block -> Print(lex_stream);
  1278.     }
  1279.  
  1280.     void AstThisCall::Print(LexStream& lex_stream)
  1281.     {
  1282.         Coutput << "#" << this -> id << " (ThisCall):  ";
  1283.         if (base_opt)
  1284.         {
  1285.             Coutput << "#" << base_opt -> id
  1286.                     << lex_stream.NameString(dot_token_opt);
  1287.         }
  1288.         Coutput << lex_stream.NameString(this_token)
  1289.                 << " (";
  1290.         for (int i = 0; i < this -> NumArguments(); i++)
  1291.             Coutput << " #" << this -> Argument(i) -> id;
  1292.         Coutput << " ) \n";
  1293.  
  1294.         if (base_opt)
  1295.             base_opt -> Print(lex_stream);
  1296.  
  1297.         for (int j = 0; j < NumArguments(); j++)
  1298.             this -> Argument(j) -> Print(lex_stream);
  1299.     }
  1300.  
  1301.     void AstSuperCall::Print(LexStream& lex_stream)
  1302.     {
  1303.         Coutput << "#" << this -> id << " (SuperCall):  ";
  1304.         if (base_opt)
  1305.         {
  1306.             Coutput << "#" << base_opt -> id
  1307.                     << lex_stream.NameString(dot_token_opt);
  1308.         }
  1309.         Coutput << lex_stream.NameString(super_token)
  1310.                 << " (";
  1311.         for (int i = 0; i < this -> NumArguments(); i++)
  1312.             Coutput << " #" << this -> Argument(i) -> id;
  1313.         Coutput << " ) \n";
  1314.  
  1315.         if (base_opt)
  1316.             base_opt -> Print(lex_stream);
  1317.  
  1318.         for (int j = 0; j < NumArguments(); j++)
  1319.             this -> Argument(j) -> Print(lex_stream);
  1320.     }
  1321.  
  1322.     void AstConstructorBlock::Print(LexStream& lex_stream)
  1323.     {
  1324.         Coutput << "#" << this -> id << " (ConstructorBlock):  ";
  1325.         if (explicit_constructor_invocation_opt)
  1326.              Coutput << " #" << explicit_constructor_invocation_opt -> id;
  1327.         else Coutput << " #0";
  1328.         Coutput << " #" << block -> id
  1329.                 << "\n";
  1330.  
  1331.         if (explicit_constructor_invocation_opt)
  1332.             explicit_constructor_invocation_opt -> Print(lex_stream);
  1333.         block -> Print(lex_stream);
  1334.     }
  1335.  
  1336.     void AstConstructorDeclaration::Print(LexStream& lex_stream)
  1337.     {
  1338.         Coutput << "#" << this -> id << " (ConstructorDeclaration):  ";
  1339.         for (int i = 0; i < this -> NumConstructorModifiers(); i++)
  1340.         {
  1341.             Coutput << lex_stream.NameString(this -> ConstructorModifier(i) -> modifier_kind_token)
  1342.                     << " ";
  1343.         }
  1344.         Coutput << " #" << constructor_declarator -> id
  1345.                 << " throws: (";
  1346.         for (int j = 0; j < this -> NumThrows(); j++)
  1347.             Coutput << " #" << this -> Throw(j) -> id;
  1348.         Coutput << ") #" << constructor_body -> id
  1349.                 << "\n";
  1350.  
  1351.         constructor_declarator -> Print(lex_stream);
  1352.         for (int k = 0; k < this -> NumThrows(); k++)
  1353.             this -> Throw(k) -> Print(lex_stream);
  1354.         constructor_body -> Print(lex_stream);
  1355.     }
  1356.  
  1357.     void AstInterfaceDeclaration::Print(LexStream& lex_stream)
  1358.     {
  1359.         Coutput << "#" << this -> id << " (InterfaceDeclaration):  ";
  1360.         for (int i = 0; i < this -> NumInterfaceModifiers(); i++)
  1361.         {
  1362.             Coutput << lex_stream.NameString(this -> InterfaceModifier(i) -> modifier_kind_token)
  1363.                     << " ";
  1364.         }
  1365.         Coutput << lex_stream.NameString(interface_token)
  1366.                 << " "
  1367.                 << lex_stream.NameString(identifier_token)
  1368.                 << "(";
  1369.         for (int j = 0; j < NumExtendsInterfaces(); j++)
  1370.             Coutput << " #" << this -> ExtendsInterface(j) -> id;
  1371.         Coutput << ") {";
  1372.         for (int m = 0; m < NumInterfaceMemberDeclarations(); m++)
  1373.             Coutput << " #" << this -> InterfaceMemberDeclaration(m) -> id;
  1374.         Coutput << "}\n";
  1375.  
  1376.         for (int k = 0; k < NumExtendsInterfaces(); k++)
  1377.             this -> ExtendsInterface(k) -> Print(lex_stream);
  1378.         for (int n = 0; n < NumInterfaceMemberDeclarations(); n++)
  1379.             this -> InterfaceMemberDeclaration(n) -> Print(lex_stream);
  1380.     }
  1381.  
  1382.     void AstLocalVariableDeclarationStatement::Print(LexStream& lex_stream)
  1383.     {
  1384.         Coutput << "#" << this -> id << " (LocalVariableDeclarationStatement):  ";
  1385.         for (int i = 0; i < this -> NumLocalModifiers(); i++)
  1386.         {
  1387.             Coutput << lex_stream.NameString(this -> LocalModifier(i) -> modifier_kind_token)
  1388.                     << " ";
  1389.         }
  1390.         Coutput << "#" << type -> id
  1391.                 << "(";
  1392.         for (int j = 0; j < this -> NumVariableDeclarators(); j++)
  1393.             Coutput << " #" << this -> VariableDeclarator(j) -> id;
  1394.         Coutput << ") \n";
  1395.  
  1396.         type -> Print(lex_stream);
  1397.         for (int k = 0; k < this -> NumVariableDeclarators(); k++)
  1398.             this -> VariableDeclarator(k) -> Print(lex_stream);
  1399.     }
  1400.  
  1401.     void AstIfStatement::Print(LexStream& lex_stream)
  1402.     {
  1403.         Coutput << "#" << this -> id << " (IfStatement):  "
  1404.                 << lex_stream.NameString(if_token)
  1405.                 << " ( #" << expression -> id << " ) #" << true_statement -> id;
  1406.         if (false_statement_opt)
  1407.              Coutput << " else #" << false_statement_opt -> id;
  1408.         else Coutput << " #0";
  1409.         Coutput << "\n";
  1410.  
  1411.         expression -> Print(lex_stream);
  1412.         true_statement -> Print(lex_stream);
  1413.         if (false_statement_opt)
  1414.             false_statement_opt -> Print(lex_stream);
  1415.     }
  1416.  
  1417.     void AstEmptyStatement::Print(LexStream& lex_stream)
  1418.     {
  1419.         Coutput << "#" << this -> id << " (EmptyStatement):  "
  1420.                 << lex_stream.NameString(semicolon_token)
  1421.                 << "\n";
  1422.     }
  1423.  
  1424.     void AstExpressionStatement::Print(LexStream& lex_stream)
  1425.     {
  1426.         Coutput << "#" << this -> id << " (ExpressionStatement):  " << "#" << expression -> id << "\n";
  1427.         expression -> Print(lex_stream);
  1428.     }
  1429.  
  1430.     void AstCaseLabel::Print(LexStream& lex_stream)
  1431.     {
  1432.         Coutput << "#" << this -> id << " (CaseLabel):  "
  1433.                 << lex_stream.NameString(case_token)
  1434.                 << " #" << expression -> id << ":\n";
  1435.         expression -> Print(lex_stream);
  1436.         Coutput << "    map_index: " << map_index << "\n";
  1437.     }
  1438.  
  1439.     void AstDefaultLabel::Print(LexStream& lex_stream)
  1440.     {
  1441.         Coutput << "#" << this -> id << " (DefaultLabel):  "
  1442.                 << lex_stream.NameString(default_token)
  1443.                 << ":\n";
  1444.     }
  1445.  
  1446.     void AstSwitchBlockStatement::Print(LexStream& lex_stream)
  1447.     {
  1448.         Coutput << "#" << this -> id << " (SwitchBlockStatement): ";
  1449.         for (int i = 0; i < NumSwitchLabels(); i++)
  1450.         {
  1451.             if (i % 10 == 0)
  1452.                  Coutput << "\n        ";
  1453.             Coutput << " #" << this -> SwitchLabel(i) -> id << ':';
  1454.         }
  1455.         Coutput << "\n";
  1456.         for (int k = 0; k < NumStatements(); k++)
  1457.         {
  1458.             if (k % 10 == 0)
  1459.                  Coutput << "\n            ";
  1460.             Coutput << " #" << this -> Statement(k) -> id;
  1461.         }
  1462.         Coutput << "\n";
  1463.  
  1464.         for (int j = 0; j < NumSwitchLabels(); j++)
  1465.             this -> SwitchLabel(j) -> Print(lex_stream);
  1466.         for (int l = 0; l < NumStatements(); l++)
  1467.             this -> Statement(l) -> Print(lex_stream);
  1468.     }
  1469.  
  1470.     void AstSwitchStatement::Print(LexStream& lex_stream)
  1471.     {
  1472.         Coutput << "#" << this -> id << " (SwitchStatement):  "
  1473.                 << lex_stream.NameString(switch_token)
  1474.                 << " ( #" << expression -> id << " ) #" << switch_block -> id << "\n";
  1475.  
  1476.         Coutput << "default case: index " << default_case.index << "\n";
  1477.         for (int i = 0; i < cases -> Length(); i++)
  1478.         {
  1479.             Coutput << "case: " << i << "  index: " << (*cases)[i] -> index << "  value: " << (*cases)[i] -> Value() << "\n";
  1480.         }
  1481.  
  1482.         expression -> Print(lex_stream);
  1483.         switch_block -> Print(lex_stream);
  1484.     }
  1485.  
  1486.     void AstWhileStatement::Print(LexStream& lex_stream)
  1487.     {
  1488.         Coutput << "#" << this -> id << " (WhileStatement):  "
  1489.                 << lex_stream.NameString(while_token)
  1490.                 << " ( #" << expression -> id << " ) #" << statement -> id << "\n";
  1491.         expression -> Print(lex_stream);
  1492.         statement -> Print(lex_stream);
  1493.     }
  1494.  
  1495.     void AstDoStatement::Print(LexStream& lex_stream)
  1496.     {
  1497.         Coutput << "#" << this -> id << " (DoStatement):  "
  1498.                 << lex_stream.NameString(do_token)
  1499.                 << " { #" << statement -> id << " } "
  1500.                 << lex_stream.NameString(while_token)
  1501.                 << " ( #" << expression -> id << " ) #\n";
  1502.  
  1503.         statement -> Print(lex_stream);
  1504.         expression -> Print(lex_stream);
  1505.     }
  1506.  
  1507.     void AstForStatement::Print(LexStream& lex_stream)
  1508.     {
  1509.         Coutput << "#" << this -> id << " (ForStatement):  ("
  1510.                 << lex_stream.NameString(for_token);
  1511.         for (int i = 0; i < this -> NumForInitStatements(); i++)
  1512.             Coutput << " #" << this -> ForInitStatement(i) -> id;
  1513.         Coutput << "; #" << (end_expression_opt ? end_expression_opt -> id : 0) << ";";
  1514.         for (int k = 0; k < this -> NumForInitStatements(); k++)
  1515.             Coutput << " #" << this -> ForUpdateStatement(k) -> id;
  1516.         Coutput << ") #" << statement -> id << "\n";
  1517.  
  1518.         for (int m = 0; m < this -> NumForInitStatements(); m++)
  1519.             this -> ForInitStatement(m) -> Print(lex_stream);
  1520.         if (end_expression_opt)
  1521.             end_expression_opt -> Print(lex_stream);
  1522.         for (int n = 0; n < this -> NumForUpdateStatements(); n++)
  1523.             this -> ForUpdateStatement(n) -> Print(lex_stream);
  1524.         statement -> Print(lex_stream);
  1525.     }
  1526.  
  1527.     void AstBreakStatement::Print(LexStream& lex_stream)
  1528.     {
  1529.         Coutput << "#" << this -> id << " (BreakStatement):  "
  1530.                 << lex_stream.NameString(break_token)
  1531.                 << " "
  1532.                 << (identifier_token_opt ? lex_stream.NameString(identifier_token_opt) : L"")
  1533.                 << " at nesting_level " << nesting_level << "\n";
  1534.     }
  1535.  
  1536.     void AstContinueStatement::Print(LexStream& lex_stream)
  1537.     {
  1538.         Coutput << "#" << this -> id << " (ContinueStatement):  "
  1539.                 << lex_stream.NameString(continue_token)
  1540.                 << " "
  1541.                 << (identifier_token_opt ? lex_stream.NameString(identifier_token_opt) : L"")
  1542.                 << " at nesting_level " << nesting_level << "\n";
  1543.     }
  1544.  
  1545.     void AstReturnStatement::Print(LexStream& lex_stream)
  1546.     {
  1547.         Coutput << "#" << this -> id << " (ReturnStatement):  "
  1548.                 << lex_stream.NameString(return_token)
  1549.                 << " "
  1550.                 << " #" << (expression_opt ? expression_opt -> id : 0) << "\n";
  1551.         if (expression_opt)
  1552.             expression_opt -> Print(lex_stream);
  1553.     }
  1554.  
  1555.     void AstThrowStatement::Print(LexStream& lex_stream)
  1556.     {
  1557.         Coutput << "#" << this -> id << " (ThrowStatement):  "
  1558.                 << lex_stream.NameString(throw_token)
  1559.                 << " "
  1560.                 << " #" << expression -> id << "\n";
  1561.         expression -> Print(lex_stream);
  1562.     }
  1563.  
  1564.     void AstSynchronizedStatement::Print(LexStream& lex_stream)
  1565.     {
  1566.         Coutput << "#" << this -> id << " (SynchronizedStatement):  "
  1567.                 << lex_stream.NameString(synchronized_token)
  1568.                 << " ( #" << expression -> id
  1569.                 << " ) #" << block -> id << "\n";
  1570.         expression -> Print(lex_stream);
  1571.         block -> Print(lex_stream);
  1572.     }
  1573.  
  1574.     void AstCatchClause::Print(LexStream& lex_stream)
  1575.     {
  1576.         Coutput << "#" << this -> id << " (CatchClause):  "
  1577.                 << lex_stream.NameString(catch_token)
  1578.                 << " #" << formal_parameter -> id
  1579.                 << " #" << block -> id << "\n";
  1580.         formal_parameter -> Print(lex_stream);
  1581.         block -> Print(lex_stream);
  1582.     }
  1583.  
  1584.     void AstFinallyClause::Print(LexStream& lex_stream)
  1585.     {
  1586.         Coutput << "#" << this -> id << " (FinallyClause):  "
  1587.                 << lex_stream.NameString(finally_token)
  1588.                 << " #" << block -> id << "\n";
  1589.         block -> Print(lex_stream);
  1590.     }
  1591.  
  1592.     void AstTryStatement::Print(LexStream& lex_stream)
  1593.     {
  1594.         Coutput << "#" << this -> id << " (TryStatement):  "
  1595.                 << lex_stream.NameString(try_token)
  1596.                 << " #" << block -> id
  1597.                 << " catch (";
  1598.         for (int i = 0; i < this -> NumCatchClauses(); i++)
  1599.             Coutput << " #" << this -> CatchClause(i) -> id;
  1600.         Coutput << ") finally " << "#" << (finally_clause_opt ? finally_clause_opt -> id : 0) << "\n";
  1601.  
  1602.         block -> Print(lex_stream);
  1603.         for (int k = 0; k < this -> NumCatchClauses(); k++)
  1604.             this -> CatchClause(k) -> Print(lex_stream);
  1605.         if (finally_clause_opt)
  1606.             finally_clause_opt -> Print(lex_stream);
  1607.     }
  1608.  
  1609.     void AstIntegerLiteral::Print(LexStream& lex_stream)
  1610.     {
  1611.         Coutput << "#" << this -> id << " (IntegerLiteral):  "
  1612.                 << lex_stream.NameString(integer_literal_token)
  1613.                 << "\n";
  1614.     }
  1615.  
  1616.     void AstLongLiteral::Print(LexStream& lex_stream)
  1617.     {
  1618.         Coutput << "#" << this -> id << " (LongLiteral):  "
  1619.                 << lex_stream.NameString(long_literal_token)
  1620.                 << "\n";
  1621.     }
  1622.  
  1623.     void AstFloatingPointLiteral::Print(LexStream& lex_stream)
  1624.     {
  1625.         Coutput << "#" << this -> id << " (FloatingPointLiteral):  "
  1626.                 << lex_stream.NameString(floating_point_literal_token)
  1627.                 << "\n";
  1628.     }
  1629.  
  1630.     void AstDoubleLiteral::Print(LexStream& lex_stream)
  1631.     {
  1632.         Coutput << "#" << this -> id << " (DoubleLiteral):  "
  1633.                 << lex_stream.NameString(double_literal_token)
  1634.                 << "\n";
  1635.     }
  1636.  
  1637.     void AstTrueLiteral::Print(LexStream& lex_stream)
  1638.     {
  1639.         Coutput << "#" << this -> id << " (TrueLiteral):  "
  1640.                 << lex_stream.NameString(true_literal_token)
  1641.                 << "\n";
  1642.     }
  1643.  
  1644.     void AstFalseLiteral::Print(LexStream& lex_stream)
  1645.     {
  1646.         Coutput << "#" << this -> id << " (FalseLiteral):  "
  1647.                 << lex_stream.NameString(false_literal_token)
  1648.                 << "\n";
  1649.     }
  1650.  
  1651.     void AstStringLiteral::Print(LexStream& lex_stream)
  1652.     {
  1653.         Coutput << "#" << this -> id << " (StringLiteral):  "
  1654.                 << lex_stream.NameString(string_literal_token)
  1655.                 << "\n";
  1656.     }
  1657.  
  1658.     void AstCharacterLiteral::Print(LexStream& lex_stream)
  1659.     {
  1660.         Coutput << "#" << this -> id << " (CharacterLiteral):  "
  1661.                 << lex_stream.NameString(character_literal_token)
  1662.                 << "\n";
  1663.     }
  1664.  
  1665.     void AstNullLiteral::Print(LexStream& lex_stream)
  1666.     {
  1667.         Coutput << "#" << this -> id << " (NullLiteral):  "
  1668.                 << lex_stream.NameString(null_token)
  1669.                 << "\n";
  1670.     }
  1671.  
  1672.     void AstThisExpression::Print(LexStream& lex_stream)
  1673.     {
  1674.         Coutput << "#" << this -> id << " (ThisExpression):  "
  1675.                 << lex_stream.NameString(this_token)
  1676.                 << "\n";
  1677.     }
  1678.  
  1679.     void AstSuperExpression::Print(LexStream& lex_stream)
  1680.     {
  1681.         Coutput << "#" << this -> id << " (SuperExpression):  "
  1682.                 << lex_stream.NameString(super_token)
  1683.                 << "\n";
  1684.     }
  1685.  
  1686.     void AstParenthesizedExpression::Print(LexStream& lex_stream)
  1687.     {
  1688.         Coutput << "#" << this -> id << " (ParenthesizedExpression):  "
  1689.                 << lex_stream.NameString(left_parenthesis_token)
  1690.                 << "#" << expression -> id
  1691.                 << lex_stream.NameString(right_parenthesis_token)
  1692.                 << "\n";
  1693.         expression -> Print(lex_stream);
  1694.     }
  1695.  
  1696.     void AstTypeExpression::Print(LexStream& lex_stream)
  1697.     {
  1698.         Coutput << "#" << this -> id << " (TypeExpression):  "
  1699.                 << " #" << type -> id << "\n";
  1700.         type -> Print(lex_stream);
  1701.     }
  1702.  
  1703.     void AstClassInstanceCreationExpression::Print(LexStream& lex_stream)
  1704.     {
  1705.         Coutput << "#" << this -> id << " (ClassInstanceCreationExpression):  ";
  1706.         if (base_opt)
  1707.         {
  1708.             Coutput << "#" << base_opt -> id
  1709.                     << lex_stream.NameString(dot_token_opt) << " ";
  1710.         }
  1711.         Coutput << " ";
  1712.         Coutput << lex_stream.NameString(new_token)
  1713.                 << " #" << class_type -> id
  1714.                 << " (";
  1715.         for (int i = 0; i < this -> NumArguments(); i++)
  1716.             Coutput << " #" << this -> Argument(i) -> id;
  1717.         Coutput << " ) "
  1718.                 << "#" << (class_body_opt ? class_body_opt -> id : 0) << "\n";
  1719.  
  1720.         if (base_opt)
  1721.             base_opt -> Print(lex_stream);
  1722.  
  1723.         class_type -> Print(lex_stream);
  1724.         for (int j = 0; j < NumArguments(); j++)
  1725.             this -> Argument(j) -> Print(lex_stream);
  1726.  
  1727.         if (class_body_opt)
  1728.             class_body_opt -> Print(lex_stream);
  1729.     }
  1730.  
  1731.     void AstDimExpr::Print(LexStream& lex_stream)
  1732.     {
  1733.         Coutput << "#" << this -> id << " (DimExpr):  [ #" << expression -> id << " ]\n";
  1734.         expression -> Print(lex_stream);
  1735.     }
  1736.  
  1737.     void AstArrayCreationExpression::Print(LexStream& lex_stream)
  1738.     {
  1739.         Coutput << "#" << this -> id << " (ArrayCreationExpression):  "
  1740.                 << lex_stream.NameString(new_token)
  1741.                 << " #" << array_type -> id;
  1742.         for (int i = 0; i < NumDimExprs(); i++)
  1743.             Coutput << " [#" << DimExpr(i) -> id << "]";
  1744.         for (int k = 0; k < NumBrackets(); k++)
  1745.              Coutput << " []";
  1746.         Coutput << " "
  1747.                 << "#" << (array_initializer_opt ? array_initializer_opt -> id : 0) << "\n";
  1748.  
  1749.         array_type -> Print(lex_stream);
  1750.         for (int j = 0; j < this -> NumDimExprs(); j++)
  1751.             DimExpr(j) -> Print(lex_stream);
  1752.     }
  1753.  
  1754.     void AstFieldAccess::Print(LexStream& lex_stream)
  1755.     {
  1756.         Coutput << "#" << this -> id << " (FieldAccess):  "
  1757.                 << " #" << base -> id << " "
  1758.                 << lex_stream.NameString(identifier_token)
  1759.                 << "\n";
  1760.  
  1761.         base -> Print(lex_stream);
  1762.     }
  1763.  
  1764.     void AstMethodInvocation::Print(LexStream& lex_stream)
  1765.     {
  1766.         Coutput << "#" << this -> id << " (MethodInvocation):  "
  1767.                 << "#" << method -> id
  1768.                 << " (";
  1769.         for (int i = 0; i < this -> NumArguments(); i++)
  1770.             Coutput << " #" << this -> Argument(i) -> id;
  1771.         Coutput << " ) \n";
  1772.  
  1773.         method -> Print(lex_stream);
  1774.         for (int j = 0; j < NumArguments(); j++)
  1775.             this -> Argument(j) -> Print(lex_stream);
  1776.     }
  1777.  
  1778.     void AstArrayAccess::Print(LexStream& lex_stream)
  1779.     {
  1780.         Coutput << "#" << this -> id << " (ArrayAccess):  "
  1781.                 << "#" << base -> id
  1782.                 << " [ #" << expression -> id << " ]\n";
  1783.  
  1784.         base -> Print(lex_stream);
  1785.         expression -> Print(lex_stream);
  1786.     }
  1787.  
  1788.     void AstPostUnaryExpression::Print(LexStream& lex_stream)
  1789.     {
  1790.         Coutput << "#" << this -> id << " (PostUnaryExpression):  "
  1791.                 << "#" << expression -> id
  1792.                 << lex_stream.NameString(post_operator_token)
  1793.                 << "\n";
  1794.  
  1795.         expression -> Print(lex_stream);
  1796.     }
  1797.  
  1798.     void AstPreUnaryExpression::Print(LexStream& lex_stream)
  1799.     {
  1800.         Coutput << "#" << this -> id << " (PreUnaryExpression):  "
  1801.                 << lex_stream.NameString(pre_operator_token)
  1802.                 << " #" << expression -> id << "\n";
  1803.  
  1804.         expression -> Print(lex_stream);
  1805.     }
  1806.  
  1807.     void AstCastExpression::Print(LexStream& lex_stream)
  1808.     {
  1809.         if (left_parenthesis_token_opt)
  1810.         {
  1811.           Coutput << "#" << this -> id << (kind == CAST ? " (CastExpression: just cast):  " : " (CastExpression: check and cast):  ")
  1812.                   << "( #" << (type_opt ? type_opt -> id : 0);
  1813.             for (int i = 0; i < NumBrackets(); i++)
  1814.                  Coutput << " []";
  1815.             Coutput << " ) #" << expression -> id << "\n";
  1816.             if (type_opt)
  1817.                 type_opt -> Print(lex_stream);
  1818.         }
  1819.         else
  1820.         {
  1821.             Coutput << "#" << this -> id << " (Java Semantic Cast to " << Type() -> Name()
  1822.                     << "):  #" << expression -> id << "\n";
  1823.         }
  1824.  
  1825.         expression -> Print(lex_stream);
  1826.     }
  1827.  
  1828.     void AstBinaryExpression::Print(LexStream& lex_stream)
  1829.     {
  1830.         Coutput << "#" << this -> id << " (BinaryExpression):  "
  1831.                 << "#" << left_expression -> id << " "
  1832.                 << lex_stream.NameString(binary_operator_token)
  1833.                 << " #" << right_expression -> id << "\n";
  1834.  
  1835.         left_expression -> Print(lex_stream);
  1836.         right_expression -> Print(lex_stream);
  1837.     }
  1838.  
  1839.     void AstConditionalExpression::Print(LexStream& lex_stream)
  1840.     {
  1841.         Coutput << "#" << this -> id << " (ConditionalExpression):  "
  1842.                 << "#" << test_expression -> id
  1843.                 << " ? #" << true_expression -> id
  1844.                 << " : #" << false_expression -> id << "\n";
  1845.  
  1846.         test_expression -> Print(lex_stream);
  1847.         true_expression -> Print(lex_stream);
  1848.         false_expression -> Print(lex_stream);
  1849.     }
  1850.  
  1851.     void AstAssignmentExpression::Print(LexStream& lex_stream)
  1852.     {
  1853.         Coutput << "#" << this -> id << " (AssignmentExpression):  "
  1854.                 << "#" << left_hand_side -> id << " "
  1855.                 << lex_stream.NameString(assignment_operator_token)
  1856.                 << " #" << expression -> id << "\n";
  1857.  
  1858.         left_hand_side -> Print(lex_stream);
  1859.         expression -> Print(lex_stream);
  1860.     }
  1861.  
  1862. #endif
  1863.  
  1864. Ast::~Ast()
  1865. {
  1866.     assert(false);
  1867. }
  1868.  
  1869. AstStatement::~AstStatement()
  1870. {
  1871.     assert(false);
  1872. }
  1873.  
  1874. AstExpression::~AstExpression()
  1875. {
  1876.     assert(false);
  1877. }
  1878.  
  1879. AstBlock::~AstBlock()
  1880. {
  1881.     assert(false);
  1882.     //    delete block_statements;
  1883. }
  1884.  
  1885. AstPrimitiveType::~AstPrimitiveType()
  1886. {
  1887.     assert(false);
  1888. }
  1889.  
  1890. AstArrayType::~AstArrayType()
  1891. {
  1892.     assert(false);
  1893.     //    delete type;
  1894.     //    delete brackets;
  1895. }
  1896.  
  1897. AstSimpleName::~AstSimpleName()
  1898. {
  1899.     assert(false);
  1900.     //    delete resolution_opt;
  1901. }
  1902.  
  1903. AstPackageDeclaration::~AstPackageDeclaration()
  1904. {
  1905.     assert(false);
  1906.     //    delete name;
  1907. }
  1908.  
  1909. AstImportDeclaration::~AstImportDeclaration()
  1910. {
  1911.     assert(false);
  1912.     //    delete name;
  1913. }
  1914.  
  1915. AstCompilationUnit::~AstCompilationUnit()
  1916. {
  1917.     assert(false);
  1918.     //    delete package_declaration_opt;
  1919.     //    delete import_declarations;
  1920.     //    delete type_declarations;
  1921. }
  1922.  
  1923. AstModifier::~AstModifier()
  1924. {
  1925.     assert(false);
  1926. }
  1927.  
  1928. AstEmptyDeclaration::~AstEmptyDeclaration()
  1929. {
  1930.     assert(false);
  1931. }
  1932.  
  1933. AstClassBody::~AstClassBody()
  1934. {
  1935.     assert(false);
  1936.     //    delete default_constructor;
  1937.     //    delete instance_variables;
  1938.     //    delete class_variables;
  1939.     //    delete methods;
  1940.     //    delete constructors;
  1941.     //    delete static_initializers;
  1942.     //    delete inner_classes;
  1943.     //    delete inner_interfaces;
  1944.     //    delete blocks;
  1945.     //    delete class_body_declarations;
  1946.     //    delete this_block;
  1947. }
  1948.  
  1949. AstClassDeclaration::~AstClassDeclaration()
  1950. {
  1951.     assert(false);
  1952.     //    delete class_modifiers;
  1953.     //    delete super_opt;
  1954.     //    delete interfaces;
  1955.     //    delete class_body;
  1956. }
  1957.  
  1958. AstArrayInitializer::~AstArrayInitializer()
  1959. {
  1960.     assert(false);
  1961.     //    delete variable_initializers;
  1962. }
  1963.  
  1964. AstBrackets::~AstBrackets()
  1965. {
  1966.     assert(false);
  1967. }
  1968.  
  1969. AstVariableDeclaratorId::~AstVariableDeclaratorId()
  1970. {
  1971.     assert(false);
  1972.     //    delete brackets;
  1973. }
  1974.  
  1975. AstVariableDeclarator::~AstVariableDeclarator()
  1976. {
  1977.     assert(false);
  1978.     //    delete variable_declarator_name;
  1979.     //    delete variable_initializer_opt;
  1980. }
  1981.  
  1982. AstFieldDeclaration::~AstFieldDeclaration()
  1983. {
  1984.     assert(false);
  1985.     //    delete variable_modifiers;
  1986.     //    delete type;
  1987.     //    delete variable_declarators;
  1988. }
  1989.  
  1990. AstFormalParameter::~AstFormalParameter()
  1991. {
  1992.     assert(false);
  1993.     //    delete parameter_modifiers;
  1994.     //    delete type;
  1995.     //    delete variable_declarator_name;
  1996. }
  1997.  
  1998. AstMethodDeclarator::~AstMethodDeclarator()
  1999. {
  2000.     assert(false);
  2001.     //    delete formal_parameters;
  2002.     //    delete brackets;
  2003. }
  2004.  
  2005. AstMethodDeclaration::~AstMethodDeclaration()
  2006. {
  2007.     assert(false);
  2008.     //    delete method_modifiers;
  2009.     //    delete type;
  2010.     //    delete method_declarator;
  2011.     //    delete throws;
  2012.     //    delete method_body;
  2013. }
  2014.  
  2015. AstStaticInitializer::~AstStaticInitializer()
  2016. {
  2017.     assert(false);
  2018.     //    delete block;
  2019. }
  2020.  
  2021. AstThisCall::~AstThisCall()
  2022. {
  2023.     assert(false);
  2024.     //    delete arguments;
  2025.     //    delete base_opt;
  2026.     //    delete local_arguments_opt;
  2027. }
  2028.  
  2029. AstSuperCall::~AstSuperCall()
  2030. {
  2031.     assert(false);
  2032.     //    delete base_opt;
  2033.     //    delete arguments;
  2034.     //    delete local_arguments_opt;
  2035. }
  2036.  
  2037. AstConstructorBlock::~AstConstructorBlock()
  2038. {
  2039.     assert(false);
  2040.     //    delete explicit_constructor_invocation_opt;
  2041.     //    delete block;
  2042.     //    delete local_init_block;
  2043.     //    delete original_constructor_invocation;
  2044. }
  2045.  
  2046. AstConstructorDeclaration::~AstConstructorDeclaration()
  2047. {
  2048.     assert(false);
  2049.     //    delete constructor_modifiers;
  2050.     //    delete constructor_declarator;
  2051.     //    delete throws;
  2052.     //    delete constructor_body;
  2053. }
  2054.  
  2055. AstInterfaceDeclaration::~AstInterfaceDeclaration()
  2056. {
  2057.     assert(false);
  2058.     //    delete class_variables;
  2059.     //    delete abstract_methods;
  2060.     //    delete inner_classes;
  2061.     //    delete inner_interfaces;
  2062.     //    delete interface_modifiers;
  2063.     //    delete extends_interfaces;
  2064.     //    delete interface_member_declarations;
  2065. }
  2066.  
  2067. AstLocalVariableDeclarationStatement::~AstLocalVariableDeclarationStatement()
  2068. {
  2069.     assert(false);
  2070.     //    delete local_modifiers;
  2071.     //    delete type;
  2072.     //    delete variable_declarators;
  2073. }
  2074.  
  2075. AstIfStatement::~AstIfStatement()
  2076. {
  2077.     assert(false);
  2078.     //    delete expression;
  2079.     //    delete true_statement;
  2080.     //    delete false_statement_opt;
  2081. }
  2082.  
  2083. AstEmptyStatement::~AstEmptyStatement()
  2084. {
  2085.     assert(false);
  2086. }
  2087.  
  2088. AstExpressionStatement::~AstExpressionStatement()
  2089. {
  2090.     assert(false);
  2091.     //    delete expression;
  2092. }
  2093.  
  2094. AstCaseLabel::~AstCaseLabel()
  2095. {
  2096.     assert(false);
  2097.     //    delete expression;
  2098. }
  2099.  
  2100. AstDefaultLabel::~AstDefaultLabel()
  2101. {
  2102.     assert(false);
  2103. }
  2104.  
  2105. AstSwitchBlockStatement::~AstSwitchBlockStatement()
  2106. {
  2107.     assert(false);
  2108.     //    delete switch_labels;
  2109.     //    delete block_statements;
  2110. }
  2111.  
  2112. AstSwitchStatement::~AstSwitchStatement()
  2113. {
  2114.     assert(false);
  2115.     //    delete expression;
  2116.     //    delete switch_block;
  2117. }
  2118.  
  2119. AstWhileStatement::~AstWhileStatement()
  2120. {
  2121.     assert(false);
  2122.     //    delete expression;
  2123.     //    delete statement;
  2124. }
  2125.  
  2126. AstDoStatement::~AstDoStatement()
  2127. {
  2128.     assert(false);
  2129.     //    delete statement;
  2130.     //    delete expression;
  2131. }
  2132.  
  2133. AstForStatement::~AstForStatement()
  2134. {
  2135.     assert(false);
  2136.     //    delete for_init_statements;
  2137.     //    delete end_expression_opt;
  2138.     //    delete for_update_statements;
  2139.     //    delete statement;
  2140. }
  2141.  
  2142. AstBreakStatement::~AstBreakStatement()
  2143. {
  2144.     assert(false);
  2145. }
  2146.  
  2147. AstContinueStatement::~AstContinueStatement()
  2148. {
  2149.     assert(false);
  2150. }
  2151.  
  2152. AstReturnStatement::~AstReturnStatement()
  2153. {
  2154.     assert(false);
  2155.     //    delete expression_opt;
  2156. }
  2157.  
  2158. AstThrowStatement::~AstThrowStatement()
  2159. {
  2160.     assert(false);
  2161.     //    delete expression;
  2162. }
  2163.  
  2164. AstSynchronizedStatement::~AstSynchronizedStatement()
  2165. {
  2166.     assert(false);
  2167.     //    delete expression;
  2168.     //    delete block;
  2169. }
  2170.  
  2171. AstCatchClause::~AstCatchClause()
  2172. {
  2173.     assert(false);
  2174.     //    delete formal_parameter;
  2175.     //    delete block;
  2176. }
  2177.  
  2178. AstFinallyClause::~AstFinallyClause()
  2179. {
  2180.     assert(false);
  2181.     //    delete block;
  2182. }
  2183.  
  2184. AstTryStatement::~AstTryStatement()
  2185. {
  2186.     assert(false);
  2187.     //    delete block;
  2188.     //    delete catch_clauses;
  2189.     //    delete finally_clause_opt;
  2190. }
  2191.  
  2192. AstIntegerLiteral::~AstIntegerLiteral()
  2193. {
  2194.     assert(false);
  2195. }
  2196.  
  2197. AstLongLiteral::~AstLongLiteral()
  2198. {
  2199.     assert(false);
  2200. }
  2201.  
  2202. AstFloatingPointLiteral::~AstFloatingPointLiteral()
  2203. {
  2204.     assert(false);
  2205. }
  2206.  
  2207. AstDoubleLiteral::~AstDoubleLiteral()
  2208. {
  2209.     assert(false);
  2210. }
  2211.  
  2212. AstTrueLiteral::~AstTrueLiteral()
  2213. {
  2214.     assert(false);
  2215. }
  2216.  
  2217. AstFalseLiteral::~AstFalseLiteral()
  2218. {
  2219.     assert(false);
  2220. }
  2221.  
  2222. AstStringLiteral::~AstStringLiteral()
  2223. {
  2224.     assert(false);
  2225. }
  2226.  
  2227. AstCharacterLiteral::~AstCharacterLiteral()
  2228. {
  2229.     assert(false);
  2230. }
  2231.  
  2232. AstNullLiteral::~AstNullLiteral()
  2233. {
  2234.     assert(false);
  2235. }
  2236.  
  2237. AstThisExpression::~AstThisExpression()
  2238. {
  2239.     assert(false);
  2240. }
  2241.  
  2242. AstSuperExpression::~AstSuperExpression()
  2243. {
  2244.     assert(false);
  2245. }
  2246.  
  2247. AstParenthesizedExpression::~AstParenthesizedExpression()
  2248. {
  2249.     assert(false);
  2250.     //    delete expression;
  2251. }
  2252.  
  2253. AstTypeExpression::~AstTypeExpression()
  2254. {
  2255.     assert(false);
  2256.     //    delete type;
  2257. }
  2258.  
  2259. AstClassInstanceCreationExpression::~AstClassInstanceCreationExpression()
  2260. {
  2261.     assert(false);
  2262.     //    delete base_opt;
  2263.     //    delete class_type;
  2264.     //    delete arguments;
  2265.     //    delete class_body_opt;
  2266.     //    delete local_arguments_opt;
  2267. }
  2268.  
  2269. AstDimExpr::~AstDimExpr()
  2270. {
  2271.     assert(false);
  2272.     //    delete expression;
  2273. }
  2274.  
  2275. AstArrayCreationExpression::~AstArrayCreationExpression()
  2276. {
  2277.     assert(false);
  2278.     //    delete array_type;
  2279.     //    delete dim_exprs;
  2280.     //    delete brackets;
  2281.     //    delete array_initializer_opt;
  2282. }
  2283.  
  2284. AstFieldAccess::~AstFieldAccess()
  2285. {
  2286.     assert(false);
  2287.     //    delete base;
  2288.     //    delete resolution_opt;
  2289. }
  2290.  
  2291. AstMethodInvocation::~AstMethodInvocation()
  2292. {
  2293.     assert(false);
  2294.     //    delete method;
  2295.     //    delete arguments;
  2296.     //    delete resolution_opt;
  2297. }
  2298.  
  2299. AstArrayAccess::~AstArrayAccess()
  2300. {
  2301.     assert(false);
  2302.     //    delete base;
  2303.     //    delete expression;
  2304. }
  2305.  
  2306. AstPostUnaryExpression::~AstPostUnaryExpression()
  2307. {
  2308.     assert(false);
  2309.     //    delete expression;
  2310. }
  2311.  
  2312. AstPreUnaryExpression::~AstPreUnaryExpression()
  2313. {
  2314.     assert(false);
  2315.     //    delete expression;
  2316. }
  2317.  
  2318. AstCastExpression::~AstCastExpression()
  2319. {
  2320.     assert(false);
  2321.     //    delete type_opt;
  2322.     //    delete brackets;
  2323.     //    delete expression;
  2324. }
  2325.  
  2326. AstBinaryExpression::~AstBinaryExpression()
  2327. {
  2328.    assert(false);
  2329.    //    delete left_expression;
  2330.    //    delete right_expression;
  2331. }
  2332.  
  2333. AstConditionalExpression::~AstConditionalExpression()
  2334. {
  2335.     assert(false);
  2336.     //    delete test_expression;
  2337.     //    delete true_expression;
  2338.     //    delete false_expression;
  2339. }
  2340.  
  2341. AstAssignmentExpression::~AstAssignmentExpression()
  2342. {
  2343.     assert(false);
  2344.     //    delete left_hand_side;
  2345.     //    delete expression;
  2346. }
  2347.